<?php

namespace Gds\ArticleBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Gds\ArticleBundle\Entity\BonTransfert
 *
 * @ORM\Table()
 * @ORM\Entity
 */
class BonTransfert
{
     /**
     * @ORM\OneToMany(targetEntity="Gds\ArticleBundle\Entity\LigneBonTransfert", mappedBy="bonTransfert")
     */
    private $lignes; // Ici commentaires prend un "s", car un article a plusieurs commentaires !
 
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var \DateTime $date
     *
     * @ORM\Column(name="date", type="date")
     */
    private $date;

    /**
     * @var string $reference
     *
     * @ORM\Column(name="reference", type="string", length=255)
     */
    private $reference;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set date
     *
     * @param \DateTime $date
     * @return BonTransfert
     */
    public function setDate($date)
    {
        $this->date = $date;
    
        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime 
     */
    public function getDate()
    {
        return $this->date;
    }

    /**
     * Set reference
     *
     * @param string $reference
     * @return BonTransfert
     */
    public function setReference($reference)
    {
        $this->reference = $reference;
    
        return $this;
    }

    /**
     * Get reference
     *
     * @return string 
     */
    public function getReference()
    {
        return $this->reference;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->lignes = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Add lignes
     *
     * @param Gds\ArticleBundle\Entity\LigneBonTransfert $lignes
     * @return BonTransfert
     */
    public function addLigne(\Gds\ArticleBundle\Entity\LigneBonTransfert $lignes)
    {
        $this->lignes[] = $lignes;
    
        return $this;
    }

    /**
     * Remove lignes
     *
     * @param Gds\ArticleBundle\Entity\LigneBonTransfert $lignes
     */
    public function removeLigne(\Gds\ArticleBundle\Entity\LigneBonTransfert $lignes)
    {
        $this->lignes->removeElement($lignes);
    }

    /**
     * Get lignes
     *
     * @return Doctrine\Common\Collections\Collection 
     */
    public function getLignes()
    {
        return $this->lignes;
    }
}
